package com.zmm.member.dao;

import com.zmm.member.model.CustomerAddress;
import com.zmm.member.submit.vo.OrderAddressVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * @author 900045
 * @description:
 * @name CustomerAddressDao
 * @date By 2021-07-23 14:55:09
 */
public interface CustomerAddressDao {


	/**
	 * 根据 用户ID 查询 用户地址列表 -- jdbc
	 * @author: 900045
	 * @date: 2021-07-23 14:56:14
	 * @throws 
	 * @param customerId: 
	 * @return: java.util.List<org.apache.tomcat.jni.Address>
	 **/
	List<OrderAddressVo> selectCustomerAddressListByCustomerId(@Param("customerId") Integer customerId);

	/**
	 * 根据 用户ID 查询默认的地址 -- jdbc
	 * @author: 900045
	 * @date: 2021-08-04 16:03:46
	 * @throws 
	 * @param customerId: 
	 * @param whereDefault: 
	 * @return: com.zmm.member.model.CustomerAddress
	 **/
	CustomerAddress searchCustomerAddressByCustomerIdAndDefault(@Param("customerId") Integer customerId, 
																@Param("whereDefault") Integer whereDefault);

	/**
	 * 新增用户地址(保存属性不为空的记录) -- jdbc
	 * @author: 900045
	 * @date: 2021-08-04 16:17:32
	 * @throws 
	 * @param customerAddress: 
	 * @return: java.lang.Integer
	 **/
	Integer saveCustomerAddress(CustomerAddress customerAddress);

	/**
	 * 更新用户地址(保存属性不为空的记录) -- jdbc
	 * @author: 900045
	 * @date: 2021-08-04 16:27:37
	 * @throws 
	 * @param customerAddress: 
	 * @return: java.lang.Integer
	 **/
	Integer updateCustomerAddress(CustomerAddress customerAddress);

	/**
	 * 将用户已有的默认地址取消 -- jdbc
	 * @author: 900045
	 * @date: 2021-08-04 16:36:43
	 * @throws 
	 * @param customerId: 
	 * @return: void
	 **/
	void updateDefaultByCustomerId(@Param("customerId") Integer customerId);
}
